package com.tqyan.model.controller.response;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @description OpenAI聊天响应
 * <p>
 * {
 *   "id": "chatcmpl-123",
 *   "object": "chat.completion",
 *   "created": 1677652288,
 *   "choices": [{
 *     "index": 0,
 *     "message": {
 *       "role": "assistant",
 *       "content": "\n\nHello there, how may I assist you today?",
 *     },
 *     "finish_reason": "stop"
 *   }],
 *   "usage": {
 *     "prompt_tokens": 9,
 *     "completion_tokens": 12,
 *     "total_tokens": 21
 *   }
 * }
 *
 * data: {
 * "id":"chatcmpl-74m2eo5tiWKywNFHvXBH8j3hQM8QI",
 * "object":"chat.completion.chunk",
 * "created":1681372340,
 * "model":"gpt-3.5-turbo-0301",
 * "choices":[{"delta":{"role":"assistant"},"index":0,"finish_reason":null}]
 * }
 * </p>
 *
 * @author 陈晨
 * @date 2023/4/10 16:55
 */
@Data
public class OpenAIChatResp implements Serializable {
    private static final long serialVersionUID = -6374935381217321588L;

    private String id;
    private String object;
    private Long created;
    private String model;
    private List<OpenAIChatChoicesResp> choices;
    private OpenAIChatUsageResp usage;

}


